import request from '@/utils/request'

export function getUserCenter(header?: any)
{
    return request.get({ url: '/user/center', header })
}

// 个人信息
export function getUserInfo()
{
    return request.get({ url: '/app.Mine/userInfo' }, { isAuth: true })
}

// 个人编辑
export function userEdit(data: any)
{
    return request.post({ url: '/user/setInfo', data }, { isAuth: true })
}

// 绑定手机
export function userBindMobile(data: any, header?: any)
{
    return request.post({ url: '/user/bindMobile', data, header }, { isAuth: true })
}

// 微信电话
export function userMnpMobile(data: any)
{
    return request.post({ url: '/user/getMobileByMnp', data }, { isAuth: true })
}

// 更改手机号
export function userChangePwd(data: any)
{
    return request.post({ url: '/user/changePassword', data }, { isAuth: true })
}

//忘记密码
export function forgotPassword(data: Record<string, any>)
{
    return request.post({ url: '/user/resetPassword', data })
}

//余额明细
export function accountLog(data: any)
{
    return request.get({ url: '/account_log/lists', data })
}
//   UploadgetToken
export const UploadgetToken = (data: any) =>
{
    return request.post({ url: '/Upload/getToken', data }, { isAuth: true })
}
export const setFileKEY = (data: any) =>
{
    return request.post({ url: '/Upload/setFile', data }, { isAuth: true })
}
//更新用户信息
export function setUserInfo(data: Record<string, any>)
{
    return request.post({ url: '/app.Login/setUserInfo', data })
}
//消息通知
export function notice()
{
    return request.post({ url: '/app.Message/notice' })
}
//消息
export function noticeDetail(data?: any)
{
    return request.post({ url: '/app.Message/noticeDetail', data }, { isAuth: true })
}
export function readNotice(data?: any)
{
    return request.post({ url: '/app.Message/readNotice', data }, { isAuth: true })
}
//钱包统计
export function walletTotal()
{
    return request.get({ url: '/app.Mine/walletTotal' })
}
//获取提现记录
export function withdrawList(data: any)
{
    return request.post({ url: '/app.Mine/withdrawList', data })
}